﻿using Itech_Run.Blog.Domain.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using System.Diagnostics;
using Volo.Abp.EntityFrameworkCore;

namespace Itech_Run.Blog.EntityFrameworkCore
{
    [Volo.Abp.Data.ConnectionStringName("Itech_RunConnectionStr")]
    public partial class Itech_RunBlogContext : AbpDbContext<Itech_RunBlogContext>
    {
        public Itech_RunBlogContext(DbContextOptions<Itech_RunBlogContext> options) : base(options)
        {
        }

        public virtual DbSet<Blog_Collect> Blog_Collect { get; set; }
        public virtual DbSet<Blog_Comment> Blog_Comment { get; set; }
        public virtual DbSet<Blog_Focus> Blog_Focus { get; set; }
        public virtual DbSet<Blog_Info> Blog_Info { get; set; }
        public virtual DbSet<Blog_Interest> Blog_Interest { get; set; }
        public virtual DbSet<Blog_PersonCategory> Blog_PersonCategory { get; set; }
        public virtual DbSet<Blog_PersonCategory_Map> Blog_PersonCategory_Map { get; set; }
        public virtual DbSet<Blog_PersonLabel> Blog_PersonLabel { get; set; }
        public virtual DbSet<Blog_PersonLabel_Map> Blog_PersonLabel_Map { get; set; }
        public virtual DbSet<Blog_Personal> Blog_Personal { get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.LogTo(message => Debug.WriteLine(message), LogLevel.Debug); //出现在“输出 - 调试”窗口
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }
    }
}
